package com.hmall.search.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.hmall.search.pojo.Item;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ItemMapper extends BaseMapper<Item> {
    //修改状态
    @Update("update tb_item set status = ${status} where id =${id}")
    int setStatus(@Param("id") Integer id, @Param("status") Integer status);
    //获取用户名字
    @Select("select username from tb_user where id =${id}")
    String getName(Integer id);
}
